/*
 * @(#)NextTag.java $version 2012-3-5
 * 
 * Copyright 2011 RogueDevelopment Gruop. All rights Reserved.
 * ROGUEDEVELOPMENT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nadostar.extensions.pagination;

import java.util.HashMap;
import java.util.Map;

/**
 * @author LEESUNG
 * 
 */
public class NextTag extends PageTag {
	protected String render(PaginationInfo info, PaginationTemplate tmpl) {
		String templateString = (info.hasNextPage()) ? tmpl.getNext() : tmpl.getNextOff();
		Map params = new HashMap();
		params.put("LINK", info.getUrlFor(info.getNextPage()));
		params.put("PAGE", "1");

		return PaginationTemplate.process(templateString, params);
	}
}
